package com.chen.back.service;

import com.chen.back.entity.Role;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Set;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author chen
 * @since 2022-02-24
 */
public interface RoleService extends IService<Role> {
    Set<String> getAllRoleNamesByUsername(String username);

    //根据角色名得到角色id
    Integer getRoleIDBYRoleName(String roleName );

    //根据角色id找到这个角色所用的权限id

    List<Integer> getAllPermissionIdByRoleId(Integer roleId);

    List<Role> listRolesByUserId(Integer userId);


}
